#ifndef __CONDITION_H__
#define __CONDITION_H__

#include "OSType.h"
#include "Mutex.h"

class CCondition : public CNonCopyable
{
public:
    CCondition(CMutex &mtx);
    ~CCondition();

    void Wait();
    Bool WaitForSeconds(Double seconds);
    void Notify();
    void NotifyAll();

private:
    CMutex&         	m_mutex;
    pthread_cond_t      m_cond;
};

#endif
